(function () {
    'use strict';

    angular.module('BlurAdmin', [
        'ngAnimate',
        'ui.bootstrap',
        'ui.sortable',
        'ui.router',
        'ngTouch',
        'toastr',
        'smart-table',
        "xeditable",
        'ui.slimscroll',
        'ngJsTree',
        'angular-progress-button-styles',

        'ngCookies',
        'ui.bootstrap.datetimepicker',
        'angularFileUpload',
        'imageCropper',

        'BlurAdmin.theme',
        'BlurAdmin.pages'
    ])
        .controller('appCtrl', function ($scope) {
            $scope.appConfig = {
                host: '//qa.cheerhub.com.hk'
            }
            //初始化时间选择器
            moment.locale('zh-cn');
        })

    window.$config = {
        // host: '//qa.cheerhub.com.hk',
        host: '',
        urlCode: function (obj) {
            var str = [];
            for (var p in obj) {
                str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
            }
            return str.join("&");
        }
    }
})();